<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#">合作伙伴申请列表</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('Partner/index')}">
            用户名:
            <input type="text" class="form-control" name="user_name" style="width: 120px;" value="{$user_name}" >
            手机号:
            <input type="text" class="form-control" name="mobile" style="width: 120px;" value="{$mobile}" >
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Partner/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="100">编号</th>
					<th>代理商级别</th>
					<th>代理商手机号码</th>
					<th>代理人姓名</th>
					<th>代理人状态</th>
					<th>近一年销售量</th>
					<th width="210">操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.pn_id}</td>
					<td><?php echo $level[$vo['apply_level']]; ?></td>
					<td>{$vo.mobile}</td>
					<td>{$vo.user_name}</td>
					<td><switch vo.status>
						<case 1>申请中</case>
						<case 2>已通过</case>
						<case 3>已拒绝</case>
						<case 4>已撤销</case>
						</switch>
					</td>
					<td><?php  echo $vo['oneself_volume']+$vo['first_volume']+$vo['second_volume'] ; ?></td>
					<td>
						<if condition="$vo.status eq 1">
							<a class="btn btn-xs btn-primary  js-ajax-dialog-btn" href="{:url('Partner/adoptStatus',array('pn_id'=>$vo['pn_id']))}" data-msg="确认要通过吗？">通过</a>	
							<a class="btn btn-xs btn-primary  js-ajax-dialog-btn" href="{:url('Partner/refuseStatus',array('pn_id'=>$vo['pn_id']))}"  data-msg="确认要拒绝吗？">拒绝</a>
						</if>
						<a class="btn btn-xs btn-danger " href="{:url('Partner/detail',array('pn_id'=>$vo['pn_id']))}">查看详情</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>